package repo

import "go-weixin/app/usercenter/model"

type UserRepo interface {
	Register(name string, password string, user *model.UserModel) (int64, error)
	Login(name string, password string, user *model.UserModel) (bool, error)
	UserExistByName(name string) (bool, error)
	UserUpdate(id int64, user *model.UserModel) (int64, error)
	GetUserByName(name string, user *model.UserModel) (bool, error)
	UserUpdateExistByName(name string, id int64) (bool, error)
	UserUpdateExistByEmail(email string, id int64) (bool, error)
	UserUpdateExistByPhone(phone string, id int64) (bool, error)
	UserUpdateRole(userId int64, oldRoleId int64, newRoleId int64) (int64, error)
	UserAddRoleExist(userId int64, roleId int64) (bool, error)
	UserAddRole(userId int64, roleId int64) (int64, error)
	UserUpdateRoleExist(userId int64, newRoleId int64) (bool, error)
	UserList(limit int64, offset int64, userList *[]model.UserModel) error
	GetUserById(id int64, user *model.UserModel) (bool, error)
	UserTest(limit int64, offset int64, userList *[]model.UserModel) error
	UserGetRole(id int64, roleList *[]model.UserGetRoleGroup) error
	UserGetPower(id int64, powerList *[]model.PowerModel) error
}
